-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: リポジトリをNode 16+/npm 8+へ変更 #1464
Conversation
✅ Deploy Preview for js-primer ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -1,28 +0,0 @@ | |||
// LICENSE : MIT | |||
"use strict"; | |||
const tester = require("text-testing-mocha"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このテストはメンテされてないのでいいかなと思ったので消した。依存的に古いから
package.json
Outdated
@@ -47,26 +47,27 @@ | |||
"gitbook", | |||
"textlint" | |||
], | |||
"workspaces": ["textlint/*"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
textlintルールはworkspaceで入れる。
@@ -2,5 +2,5 @@ | |||
publish = "_book" | |||
command = "npm run build" | |||
[build.environment] | |||
NODE_VERSION = "14" | |||
NODE_VERSION = "16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Netlifyは16
@@ -76,7 +76,7 @@ ${message}`); | |||
it("prototypeメソッドの説明をする前にObject#methodの表記を利用してはいけない", () => { | |||
// 許可リスト(読み方の解説など) | |||
const allowFilePathList = []; | |||
const searchPatterns = ["/\\`[a-zA-Z]+#[a-zA-Z]*\\`/"]; | |||
const searchPatterns = ["/`[a-zA-Z]+#[a-zA-Z]*`/"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unicodeオプションが作るのでescapeがエラーになった
@@ -12,7 +12,7 @@ | |||
"scripts": { | |||
"test": "mocha \"./final/final/test/*.js\"", | |||
"e2e": "start-server-and-test start http://localhost:3000/README.md cy:run", | |||
"start": "npx @js-primer/local-server --port 3000", | |||
"start": "npx -y @js-primer/local-server --port 3000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npxはデフォルトだとインストールはしないので、
@@ -1,833 +0,0 @@ | |||
#!/bin/sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多分pdfとかをローカルで作ってた時のかも。今はいらない。
|
||
/** | ||
* ESMのeampleを評価するテスト | ||
* Note: ESMには対応していない | ||
**/ | ||
describe("example:es", function() { | ||
const esmFiles = globby.sync([ | ||
`${sourceDir}/use-case/todoapp/**/*-example.js`, // *-example.js | ||
`${sourceDir}/use-case/todoapp/**/*.example.js`, // *.example.js | ||
]); | ||
esmFiles.forEach(filePath => { | ||
const normalizeFilePath = filePath.replace(sourceDir, ""); | ||
// TODO: doctestはしていないで、読み込んでOKかどうかだけ | ||
it(`example:es ${normalizeFilePath}`, function() { | ||
return import(filePath).catch(error => { | ||
// Stack Trace like | ||
console.error(`Dynamic Eval is failed | ||
at doctest (${filePath}:1:1)`); | ||
return Promise.reject(error); | ||
}); | ||
}); | ||
}) | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vm2はESMをサポートしてないので、dynamic importを使って評価する形にした。
.exampleとは別の名前にした方いいかもしれない。
fix #1463